<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html"/>
    <xsl:param name="searchText" select="''"/>
    <xsl:template match="/">
        <xsl:apply-templates/>
    </xsl:template>
    <xsl:template name="contain" match="album">
        <xsl:if test="contains(translate(name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),$searchText)">
            <xsl:variable name="id" select="@id"/>
            <xsl:variable name="path" select="coverImagePath"/>
            <div class="left">
                <a href="DefaultController?action=view_album&amp;albumId={$id}">
                    <img src="{$path}"/>
                </a>
                <br />
                <p>
                    <xsl:value-of select="name"/>
                </p>
            </div>
        </xsl:if>
    </xsl:template>
    
</xsl:stylesheet>
